<?php
	require("includes/basic.php");	
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
	<HEAD>
		
		<TITLE> :: <?php echo $appName?> :: </TITLE>
		<!-- <link rel='stylesheet' type='text/css' href='style/inner.css'> -->
		<script type='text/javascript' src='js/inner.js'></script>
	</HEAD>

	<body unselectable="on" class="dialog"> 
		<?php $pageName="Administration View"; ?>
		<?php require("includes/header.php"); ?>
<br/><br/><br/><br/>
		<!-- devi : body content begins here -->
		<TABLE align="center" border="0" height="90%">
			<TR>
				<td>
				
		<?php if(!isset($loggedIn)) {?>
		<link href="style/main.css" rel="stylesheet" type="text/css" />
		
		<table class="logindialog" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td>
								<table class="dialogbox" cellpadding="0" cellspacing="0">
									<tr>
										<td>
											<div class="dialoghead">
												<div id='titleId'>
													Please Login
												</div>
												<div id='titleIdOu' style='display: none;'>
													Please Login to: root organizational unit
												</div>
											</div>
											<form style="margin: 0px; padding: 0px;" action="loginprocess.php"
												name="valForm" id="valForm" method="POST">
												<div class="dialogcontent" >
													<table border="0">
														<tr>
															<td colspan="3" style="white-space: nowrap; width:500px">
															<?php
															if(isset($_REQUEST['er']))
																	{
																echo "<div style='padding-bottom: 10px;background-color: #CC6666'>";
																	
																	
																	if($_REQUEST['er']==2) {
																		echo '<b style="color:red;">Invalid Username</b>';
																	} elseif($_REQUEST['er']==1) {
																		echo '<b style="color:red;">Invalid Password</b>';
																	}
																	
																echo "</div>";
																	}
																	?>
															</td>
														</tr>
														<tr>
															<td>&nbsp;
																
															</td>
															<td colspan="2" style="white-space: nowrap;">
																<div style="padding-bottom: 10px;">
																	This is a password protected area.
																	<br />
																	Please enter your user name and your password.
																</div>
															</td>
														</tr>
														<tr>
															<td
																style="width: 60px; text-align: center; vertical-align: top"
																rowspan="4">
																<img src="images/login.png" height="48" width="48" alt="">
															</td>
															<td style="white-space: nowrap;">
																<b>User name:</b>&nbsp;&nbsp;
															</td>
															<td style="width: 300px; white-space: nowrap;">
																<input style="width: 300px;" type="text" name="username"
																	id="username" value="">
															</td>
														</tr>
														<tr>
															<td style="white-space: nowrap;">
																<b>Password:</b>&nbsp;&nbsp;
															</td>
															<td style="width: 300px; white-space: nowrap;">
																<input style="width: 300px;" type="password" name="password"
																	id="password">
															</td>
														</tr>
														<tr>
															<td>
															</td>
															<td style="white-space: nowrap;">
																<input type="hidden" name="login" id="login" value="true">
																<input class="loginbutton" type="submit" value="Login">
															</td>
														</tr>
													</table>
												</div>
											</form>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<?php
					}
					else
					{
						echo '<link href="style/admin.css" rel="stylesheet" type="text/css" />';
						require("menu.php");
					}
					?>
					</td>
			</TR>
			<TR>
				<td align="left" width="450px">
					<IMG SRC="images/snapshot.png" BORDER="0" ALT="">
				</td>
			</TR>
		</TABLE>
		<!-- devi : body content ends here -->
		
		<?php require("includes/footer.php"); ?>
	</BODY>
</HTML>
